<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style>
        tr {
            text-align: center;
            line-height: 40px;
        }
    </style>
</head>
<body>

<form action="${pageContext.request.contextPath}/EmpServlet">
    <input type="hidden" name="operation" value="add">
    姓 名：<input type="text" name="ename"> <br>
    性 别：<input type="text" name="gender"> <br>
    薪 资：<input type="text" name="salary"> <br>
    籍 贯：<input type="text" name="address"> <br>
    部门ID：<input type="text" name="dept_id"> <br>
    <button type="submit">提交</button>
</form>


<br>
<br>
<hr>
<br>
<br>
<table border="1px" cellpadding="0" cellspacing="0" align="center" width="700px">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>薪资</th>
        <th>居住地</th>
        <th>部门名称</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${list}" var="e">
        <tr>
            <td>${e.id}</td>
            <td>${e.ename}</td>
            <td>${e.gender}</td>
            <td>${e.salary}</td>
            <td>${e.address}</td>
            <td>${e.dname}</td>
            <td>
                <button>删除</button>
                <button>编辑</button>
            </td>
        </tr>
    </c:forEach>

</table>
</body>
</html>
